<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>小盒子社区-{{ username }}</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f4f4f4;
        }
        /* 导航栏样式 */
        nav {
            background-color: #333;
            color: white;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 20px;
        }

        /* 图标样式 */
        .menu-icon {
            font-size: 24px;
            cursor: pointer;
        }

        /* 右侧下拉菜单样式 */
        .dropdown {
            position: relative;
            background-color: #333;
            color: white;
            padding: 10px;
            cursor: pointer;
            border-radius: 5px;
        }

        .dropdown-content {
            display: none;
            background-color: #333;
            color: white;
            position: absolute;
            top: 100%;
            right: 0;
            width: 200px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
            border-radius: 5px;
            z-index: 1000;
        }

        .dropdown-content a {
            display: block;
            padding: 10px;
            text-decoration: none;
            color: white;
        }

        .dropdown-content a:hover {
            background-color: #575757;
        }

        /* 打开下拉菜单 */
        .dropdown.open .dropdown-content {
            display: block;
        }
    </style>
</head>
<body>
    <nav>
        <div class="menu-icon">小盒子社区</div> <!-- 使用“菜单”图标 -->
        <div class="dropdown" onclick="toggleDropdown()">
            ☰
            <div class="dropdown-content">
                <a href="/">首页</a>
                <a href="/manage_files">上传作品&作品管理</a></p>
                <a href="https://space.bilibili.com/3493133419546943">bilibili</a>
                <a href="{{ url_for('logout') }}">登出</a>
            </div>
        </div>
    </nav>

    <div>
    <h1>{{ username }}</h1>
    <h2>简介</h2>
    <p></p>
        {% for item in zhuopinsc1 %}
            <li>
                <a href="/scratch/{{ item.id }}">{{ item.title }}</a>
            </li>
        {% endfor %}
    </div>
    <script>
        function toggleDropdown() {
            const dropdown = document.querySelector('.dropdown');
            dropdown.classList.toggle('open');
        }
    </script>
</body>
</html>
